function mp3messup(mp3Path, outPath)
	[data, samplingRate] = mp3read(mp3Path);

	% adds gaussian noise
	noiseScale = 0.2;
	data = data + randn(size(data)) * noiseScale;

	[len, nChannels] = size(data);
	% The beginning 10% of the track should be intact (so that n00b users 
	% would think the whole song is OK).
	untouchedLen = ceil(len * 0.1);

	% add rounds
	function addRound(offset, scale)
		assert(offset >= untouchedLen);
		for i = 1:nChannels
			data(offset + 1:end, i) = data(offset + 1:end, i) + ...
				data(1:len - offset, i) * scale;
		end
	end

	addRound(untouchedLen, 0.6);
	addRound(ceil(untouchedLen * 1.25), 0.55);
	addRound(ceil(untouchedLen * 1.5), 0.5);
	addRound(ceil(untouchedLen * 1.75), 0.45);
	addRound(untouchedLen * 2, 0.4);

	% adds annoying tones
	function addAnnoyingTone(freq, scale)
		tone = makeTone(freq, (len - untouchedLen) / samplingRate, samplingRate)';
		tone = tone * scale;
		toneLen = size(tone, 1);
		for i = 1:nChannels
			data(len - toneLen + 1:end, i) = data(len - toneLen + 1:end, i) + tone;
		end
	end

	lowFrequency = 100;
	addAnnoyingTone(lowFrequency, 0.75);
	mediumFrequency = 554;  % C#
	addAnnoyingTone(mediumFrequency, 0.25);
	highFrequency = 5000;
	addAnnoyingTone(highFrequency, 0.6);

	% adds random silence
	nSilences = 125;
	MIN_DURATION = 0.1;
	MAX_DURATION = 0.4;
	silenceDurations = ceil((MIN_DURATION + (MAX_DURATION - MIN_DURATION) * ...
		rand(nSilences, 1)) * samplingRate);
	silencesFromTo = randi([untouchedLen+1; len], [nSilences 1]);
	silencesFromTo = [silencesFromTo, silencesFromTo + silenceDurations];

	for i = 1:nSilences
		data(silencesFromTo(i, 1):silencesFromTo(i, 2), :) = 0;
	end

	mp3write(data, samplingRate, outPath, '-b 64');
end
